<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>我的购物车</title>
    <script src="js/axios.min.js"></script>
    <script src="js/jquery-1.11.3.min.js"></script>
    <script src="js/vue.js"></script>
    <script src="layui/layui.js"></script>
    <script src="js/vue-router.js"></script>
    <link rel="stylesheet" href="layui/css/layui.css"/>
    <link rel="stylesheet" href="css/shopping-cart.css"/>
</head>
<body>
    <div id="app">
        <!--
        <div class="person" v-if="hastopay">
            <div class="address-info">收货信息</div>
            <div class="address-content">
                <div class="address-item">
                    <div class="pay-name">{{person.username}}</div>
                    <div class="pay-tele">{{person.tele}}</div>
                    <div class="pay-tele" style="margin-top: 5px;">{{person.address}}</div>
                </div>
            </div>
        </div>
        -->
        <div class="pay" v-if="hastopay">
            <div class="pay-header">
                <div class="pay-title">支付详情</div>
                <div class="cancel-pay" @click="hastopay = false">取消支付</div>
            </div>
            <div class="goodnum">共选择 {{typenum}} 类商品，总计 {{goodsnum}} 件</div>
            <div class="goodnum">总计：¥ {{allprice}}</div>
            <div class="jiesuan-btn" style="margin-top: 20px" @click="gotohadpay">支付</div>
        </div>
        <div class="cart">
            <div class="head">购物清单</div>
            <div class="layui-container" style="padding: 0;margin: 0;width: 100%">
                <div class="layui-row cart-head">
                    <div class="layui-col-md8" style="padding-left: 20px">
                        商品信息
                    </div>
                    <div class="layui-col-md1">
                        单价
                    </div>
                    <div class="layui-col-md1">
                        数量
                    </div>
                    <div class="layui-col-md1">
                        小记
                    </div>
                    <div class="layui-col-md1">
                        操作
                    </div>
                </div>

                <div class="layui-row goods-line" v-for="(cart, index) in shoppingcarts">
                    <div class="layui-col-md1" style="line-height: 110px;text-align: center;">
                        <input type="checkbox" name="payornot"  lay-skin="primary" checked>
                    </div>
                    <div class="layui-col-md7 goods-name-pic">
                        <div class="goods-img">
                            <img v-bind:src="cart.avatarUrl" height="80">
                        </div>
                        <div class="goods-name">
                            {{cart.name}}
                        </div>
                    </div>
                    <div class="layui-col-md1 item-info">¥{{cart.price}}</div>
                    <div class="layui-col-md1 item-info">{{cart.num}}</div>
                    <div class="layui-col-md1 item-info">{{cart.allPrice}}</div>
                    <div class="layui-col-md1 item-info delete-btn" @click="deleteCart(cart.sid, index)">删除</div>
                </div>

            </div>
            <div class="jiesuan">
                <div class="select-all"></div>
                <div class="select-info"></div>
                <div class="jiesuan-div">
                    <div class="jiesuan-btn" @click="pay">现在结算</div>
                </div>

            </div>
        </div>



    </div>
</body>
<script src="js/shopping-cart.js"></script>
</html>